package com.tinshow.config.utils;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by libo4 on 2017/5/30.
 */
public class ImageUtil {

    private  static Map<String,String> headImageMaps = new HashMap<>();

    public static Map<String, String> getHeadImageMaps() {
        headImageMaps.put("head1","https://img.tinshow.com/imgs/5d7a95bb-0bed-4c02-9627-9af80b6e4686");
        headImageMaps.put("head2","https://img.tinshow.com/imgs/c1e93c24-ee1f-4281-9548-76ccaf517f4c");
        headImageMaps.put("head3","https://img.tinshow.com/imgs/0b3e9c2d-fb8c-4092-82bb-e4853df9f352");
        headImageMaps.put("head4","https://img.tinshow.com/imgs/90ecc48f-8b54-462d-9c59-ccae3ec7d1b4");
        headImageMaps.put("head5","https://img.tinshow.com/imgs/3e49603d-b52d-46bc-b15a-42b6622010e2");
        return headImageMaps;
    }

    public static String getPic100ByEcho(String picUrl){
        String url = picUrl + "?imageMogr2/auto-orient/quality/100%7CimageView2/0/w/100/q/100";
        return url;
    }

    public static String getHeadImageMaps(int key){
        String value = null;
        try {
            value = getHeadImageMaps().get("head" + key);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return value;
    }
}
